package com.deuwise.system.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 *@author deuwise
 *@date 2018-11-21 11:02:18
 */
@Data
@EqualsAndHashCode(callSuper=true)
@TableName("sys_file")
public class FileDo extends Model<FileDo> implements Serializable{
    /**主键id*/
    @ApiModelProperty("主键id")
    @TableField("id")
    @TableId
    private String id;

    /**文件类型*/
    @ApiModelProperty("文件类型")
    @TableField("type")
    private String type;

    /**地址url*/
    @ApiModelProperty("地址url")
    @TableField("url")
    private String url;

    /**创建日期*/
    @ApiModelProperty("创建日期")
    @TableField("create_date")
    private Date createDate;

    /**大小*/
    @ApiModelProperty("大小")
    @TableField("size_num")
    private Long sizeNum;

    /**上传url*/
    @ApiModelProperty("上传者")
    @TableField("user_id")
    private String userId;

    @ApiModelProperty("上传者")
    @TableField(exist = false)
    private String userName;

    /**文件原始名称*/
    @ApiModelProperty("文件原始名称")
    @TableField("name")
    private String name;

    @Override
    protected Serializable pkVal() {
        return id;
    }
}